\(\int \tan ^4(c+d x) \sqrt {a+b \tan (c+d x)} \, dx\) [503]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F(-1)]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 456 \[ \int \tan ^4(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\frac {b \text {arctanh}\left (\frac {\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}} d}-\frac {b \text {arctanh}\left (\frac {\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}} d}+\frac {b \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {b \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}+\frac {2 \left (8 a^2-35 b^2\right ) (a+b \tan (c+d x))^{3/2}}{105 b^3 d}-\frac {8 a \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{35 b^2 d}+\frac {2 \tan ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{7 b d} \]

[Out]

1/2*b*arctanh(((a+(a^2+b^2)^(1/2))^(1/2)-2^(1/2)*(a+b*tan(d*x+c))^(1/2))/(a-(a^2+b^2)^(1/2))^(1/2))/d*2^(1/2)/
(a-(a^2+b^2)^(1/2))^(1/2)-1/2*b*arctanh(((a+(a^2+b^2)^(1/2))^(1/2)+2^(1/2)*(a+b*tan(d*x+c))^(1/2))/(a-(a^2+b^2
)^(1/2))^(1/2))/d*2^(1/2)/(a-(a^2+b^2)^(1/2))^(1/2)+1/4*b*ln(a+(a^2+b^2)^(1/2)-2^(1/2)*(a+(a^2+b^2)^(1/2))^(1/
2)*(a+b*tan(d*x+c))^(1/2)+b*tan(d*x+c))/d*2^(1/2)/(a+(a^2+b^2)^(1/2))^(1/2)-1/4*b*ln(a+(a^2+b^2)^(1/2)+2^(1/2)
*(a+(a^2+b^2)^(1/2))^(1/2)*(a+b*tan(d*x+c))^(1/2)+b*tan(d*x+c))/d*2^(1/2)/(a+(a^2+b^2)^(1/2))^(1/2)+2/105*(8*a
^2-35*b^2)*(a+b*tan(d*x+c))^(3/2)/b^3/d-8/35*a*tan(d*x+c)*(a+b*tan(d*x+c))^(3/2)/b^2/d+2/7*tan(d*x+c)^2*(a+b*t
an(d*x+c))^(3/2)/b/d

Rubi [A] (verified)

Time = 0.91 (sec) , antiderivative size = 456, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.435, Rules used = {3647, 3728, 3712, 3566, 714, 1143, 648, 632, 212, 642} \[ \int \tan ^4(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\frac {b \text {arctanh}\left (\frac {\sqrt {\sqrt {a^2+b^2}+a}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} d \sqrt {a-\sqrt {a^2+b^2}}}-\frac {b \text {arctanh}\left (\frac {\sqrt {\sqrt {a^2+b^2}+a}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} d \sqrt {a-\sqrt {a^2+b^2}}}+\frac {b \log \left (-\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a} \sqrt {a+b \tan (c+d x)}+\sqrt {a^2+b^2}+a+b \tan (c+d x)\right )}{2 \sqrt {2} d \sqrt {\sqrt {a^2+b^2}+a}}-\frac {b \log \left (\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a} \sqrt {a+b \tan (c+d x)}+\sqrt {a^2+b^2}+a+b \tan (c+d x)\right )}{2 \sqrt {2} d \sqrt {\sqrt {a^2+b^2}+a}}+\frac {2 \left (8 a^2-35 b^2\right ) (a+b \tan (c+d x))^{3/2}}{105 b^3 d}-\frac {8 a \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{35 b^2 d}+\frac {2 \tan ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{7 b d} \]

[In]

Int[Tan[c + d*x]^4*Sqrt[a + b*Tan[c + d*x]],x]

[Out]

(b*ArcTanh[(Sqrt[a + Sqrt[a^2 + b^2]] - Sqrt[2]*Sqrt[a + b*Tan[c + d*x]])/Sqrt[a - Sqrt[a^2 + b^2]]])/(Sqrt[2]
*Sqrt[a - Sqrt[a^2 + b^2]]*d) - (b*ArcTanh[(Sqrt[a + Sqrt[a^2 + b^2]] + Sqrt[2]*Sqrt[a + b*Tan[c + d*x]])/Sqrt
[a - Sqrt[a^2 + b^2]]])/(Sqrt[2]*Sqrt[a - Sqrt[a^2 + b^2]]*d) + (b*Log[a + Sqrt[a^2 + b^2] + b*Tan[c + d*x] -
Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]]*Sqrt[a + b*Tan[c + d*x]]])/(2*Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]]*d) - (b*Log[
a + Sqrt[a^2 + b^2] + b*Tan[c + d*x] + Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]]*Sqrt[a + b*Tan[c + d*x]]])/(2*Sqrt[2]
*Sqrt[a + Sqrt[a^2 + b^2]]*d) + (2*(8*a^2 - 35*b^2)*(a + b*Tan[c + d*x])^(3/2))/(105*b^3*d) - (8*a*Tan[c + d*x
]*(a + b*Tan[c + d*x])^(3/2))/(35*b^2*d) + (2*Tan[c + d*x]^2*(a + b*Tan[c + d*x])^(3/2))/(7*b*d)

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 648

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 714

Int[Sqrt[(d_) + (e_.)*(x_)]/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[2*e, Subst[Int[x^2/(c*d^2 + a*e^2 - 2*c*d
*x^2 + c*x^4), x], x, Sqrt[d + e*x]], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0]

Rule 1143

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[a/c, 2]}, With[{r = Rt[2*q - b/
c, 2]}, Dist[1/(2*c*r), Int[x^(m - 1)/(q - r*x + x^2), x], x] - Dist[1/(2*c*r), Int[x^(m - 1)/(q + r*x + x^2),
 x], x]]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && GeQ[m, 1] && LtQ[m, 3] && NegQ[b^2 - 4*a*c]

Rule 3566

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[b/d, Subst[Int[(a + x)^n/(b^2 + x^2), x], x
, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[a^2 + b^2, 0]

Rule 3647

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Si
mp[b^2*(a + b*Tan[e + f*x])^(m - 2)*((c + d*Tan[e + f*x])^(n + 1)/(d*f*(m + n - 1))), x] + Dist[1/(d*(m + n -
1)), Int[(a + b*Tan[e + f*x])^(m - 3)*(c + d*Tan[e + f*x])^n*Simp[a^3*d*(m + n - 1) - b^2*(b*c*(m - 2) + a*d*(
1 + n)) + b*d*(m + n - 1)*(3*a^2 - b^2)*Tan[e + f*x] - b^2*(b*c*(m - 2) - a*d*(3*m + 2*n - 4))*Tan[e + f*x]^2,
 x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]
&& IntegerQ[2*m] && GtQ[m, 2] && (GeQ[n, -1] || IntegerQ[m]) &&  !(IGtQ[n, 2] && ( !IntegerQ[m] || (EqQ[c, 0]
&& NeQ[a, 0])))

Rule 3712

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp
[C*((a + b*Tan[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Dist[A - C, Int[(a + b*Tan[e + f*x])^m, x], x] /; FreeQ[
{a, b, e, f, A, C, m}, x] && NeQ[A*b^2 + a^2*C, 0] &&  !LeQ[m, -1]

Rule 3728

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*
tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[C*(a + b*Tan[e + f*x])^m*((c + d
*Tan[e + f*x])^(n + 1)/(d*f*(m + n + 1))), x] + Dist[1/(d*(m + n + 1)), Int[(a + b*Tan[e + f*x])^(m - 1)*(c +
d*Tan[e + f*x])^n*Simp[a*A*d*(m + n + 1) - C*(b*c*m + a*d*(n + 1)) + d*(A*b + a*B - b*C)*(m + n + 1)*Tan[e + f
*x] - (C*m*(b*c - a*d) - b*B*d*(m + n + 1))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n}
, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 0] &&  !(IGtQ[n, 0] && ( !Intege
rQ[m] || (EqQ[c, 0] && NeQ[a, 0])))

Rubi steps \begin{align*} \text {integral}& = \frac {2 \tan ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{7 b d}+\frac {2 \int \tan (c+d x) \sqrt {a+b \tan (c+d x)} \left (-2 a-\frac {7}{2} b \tan (c+d x)-2 a \tan ^2(c+d x)\right ) \, dx}{7 b} \\ & = -\frac {8 a \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{35 b^2 d}+\frac {2 \tan ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{7 b d}+\frac {4 \int \sqrt {a+b \tan (c+d x)} \left (2 a^2+\frac {1}{4} \left (8 a^2-35 b^2\right ) \tan ^2(c+d x)\right ) \, dx}{35 b^2} \\ & = \frac {2 \left (8 a^2-35 b^2\right ) (a+b \tan (c+d x))^{3/2}}{105 b^3 d}-\frac {8 a \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{35 b^2 d}+\frac {2 \tan ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{7 b d}+\int \sqrt {a+b \tan (c+d x)} \, dx \\ & = \frac {2 \left (8 a^2-35 b^2\right ) (a+b \tan (c+d x))^{3/2}}{105 b^3 d}-\frac {8 a \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{35 b^2 d}+\frac {2 \tan ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{7 b d}+\frac {b \text {Subst}\left (\int \frac {\sqrt {a+x}}{b^2+x^2} \, dx,x,b \tan (c+d x)\right )}{d} \\ & = \frac {2 \left (8 a^2-35 b^2\right ) (a+b \tan (c+d x))^{3/2}}{105 b^3 d}-\frac {8 a \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{35 b^2 d}+\frac {2 \tan ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{7 b d}+\frac {(2 b) \text {Subst}\left (\int \frac {x^2}{a^2+b^2-2 a x^2+x^4} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{d} \\ & = \frac {2 \left (8 a^2-35 b^2\right ) (a+b \tan (c+d x))^{3/2}}{105 b^3 d}-\frac {8 a \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{35 b^2 d}+\frac {2 \tan ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{7 b d}+\frac {b \text {Subst}\left (\int \frac {x}{\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {b \text {Subst}\left (\int \frac {x}{\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d} \\ & = \frac {2 \left (8 a^2-35 b^2\right ) (a+b \tan (c+d x))^{3/2}}{105 b^3 d}-\frac {8 a \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{35 b^2 d}+\frac {2 \tan ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{7 b d}+\frac {b \text {Subst}\left (\int \frac {1}{\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{2 d}+\frac {b \text {Subst}\left (\int \frac {1}{\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{2 d}+\frac {b \text {Subst}\left (\int \frac {-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}+2 x}{\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {b \text {Subst}\left (\int \frac {\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}+2 x}{\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d} \\ & = \frac {b \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {b \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}+\frac {2 \left (8 a^2-35 b^2\right ) (a+b \tan (c+d x))^{3/2}}{105 b^3 d}-\frac {8 a \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{35 b^2 d}+\frac {2 \tan ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{7 b d}-\frac {b \text {Subst}\left (\int \frac {1}{2 \left (a-\sqrt {a^2+b^2}\right )-x^2} \, dx,x,-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}+2 \sqrt {a+b \tan (c+d x)}\right )}{d}-\frac {b \text {Subst}\left (\int \frac {1}{2 \left (a-\sqrt {a^2+b^2}\right )-x^2} \, dx,x,\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}+2 \sqrt {a+b \tan (c+d x)}\right )}{d} \\ & = \frac {b \text {arctanh}\left (\frac {\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}} d}-\frac {b \text {arctanh}\left (\frac {\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}} d}+\frac {b \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {b \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}+\frac {2 \left (8 a^2-35 b^2\right ) (a+b \tan (c+d x))^{3/2}}{105 b^3 d}-\frac {8 a \tan (c+d x) (a+b \tan (c+d x))^{3/2}}{35 b^2 d}+\frac {2 \tan ^2(c+d x) (a+b \tan (c+d x))^{3/2}}{7 b d} \\ \end{align*}

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 21.54 (sec) , antiderivative size = 167, normalized size of antiderivative = 0.37 \[ \int \tan ^4(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\frac {-105 i \sqrt {a-i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )+105 i \sqrt {a+i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )+\frac {2 \sqrt {a+b \tan (c+d x)} \left (8 a^3-38 a b^2-2 b \left (2 a^2+25 b^2\right ) \tan (c+d x)+3 b^2 \sec ^2(c+d x) (a+5 b \tan (c+d x))\right )}{b^3}}{105 d} \]

[In]

Integrate[Tan[c + d*x]^4*Sqrt[a + b*Tan[c + d*x]],x]

[Out]

((-105*I)*Sqrt[a - I*b]*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a - I*b]] + (105*I)*Sqrt[a + I*b]*ArcTanh[Sqrt[a
 + b*Tan[c + d*x]]/Sqrt[a + I*b]] + (2*Sqrt[a + b*Tan[c + d*x]]*(8*a^3 - 38*a*b^2 - 2*b*(2*a^2 + 25*b^2)*Tan[c
 + d*x] + 3*b^2*Sec[c + d*x]^2*(a + 5*b*Tan[c + d*x])))/b^3)/(105*d)

Maple [A] (verified)

Time = 1.75 (sec) , antiderivative size = 556, normalized size of antiderivative = 1.22

method result size
derivativedivides \(\frac {2 \left (a +b \tan \left (d x +c \right )\right )^{\frac {7}{2}}}{7 d \,b^{3}}-\frac {4 a \left (a +b \tan \left (d x +c \right )\right )^{\frac {5}{2}}}{5 d \,b^{3}}+\frac {2 a^{2} \left (a +b \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3 d \,b^{3}}-\frac {2 \left (a +b \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3 b d}+\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, \ln \left (b \tan \left (d x +c \right )+a -\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}+\frac {b \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a \ln \left (b \tan \left (d x +c \right )+a -\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}+\frac {b \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}\) \(556\)
default \(\frac {2 \left (a +b \tan \left (d x +c \right )\right )^{\frac {7}{2}}}{7 d \,b^{3}}-\frac {4 a \left (a +b \tan \left (d x +c \right )\right )^{\frac {5}{2}}}{5 d \,b^{3}}+\frac {2 a^{2} \left (a +b \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3 d \,b^{3}}-\frac {2 \left (a +b \tan \left (d x +c \right )\right )^{\frac {3}{2}}}{3 b d}+\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, \ln \left (b \tan \left (d x +c \right )+a -\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}+\frac {b \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a \ln \left (b \tan \left (d x +c \right )+a -\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}+\frac {b \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}\) \(556\)

[In]

int((a+b*tan(d*x+c))^(1/2)*tan(d*x+c)^4,x,method=_RETURNVERBOSE)

[Out]

2/7/d/b^3*(a+b*tan(d*x+c))^(7/2)-4/5/d/b^3*a*(a+b*tan(d*x+c))^(5/2)+2/3/d/b^3*a^2*(a+b*tan(d*x+c))^(3/2)-2/3*(
a+b*tan(d*x+c))^(3/2)/b/d+1/4/d/b*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*ln(b*tan(d*x+c)+a-(a+b*tan(d*x
+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))+1/d*b/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*t
an(d*x+c))^(1/2)-(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))-1/4/d/b*(2*(a^2+b^2)^(1/2)+2*a)
^(1/2)*a*ln(b*tan(d*x+c)+a-(a+b*tan(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))-1/4/d/b*(2*(a
^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*ln(b*tan(d*x+c)+a+(a+b*tan(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2
)+(a^2+b^2)^(1/2))+1/d*b/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*tan(d*x+c))^(1/2)+(2*(a^2+b^2)^(1/2)+2*a
)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))+1/4/d/b*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a*ln(b*tan(d*x+c)+a+(a+b*tan(d*x
+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 416, normalized size of antiderivative = 0.91 \[ \int \tan ^4(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=-\frac {105 \, b^{3} d \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \log \left (d^{3} \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \sqrt {-\frac {b^{2}}{d^{4}}} + \sqrt {b \tan \left (d x + c\right ) + a} b\right ) - 105 \, b^{3} d \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \log \left (-d^{3} \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \sqrt {-\frac {b^{2}}{d^{4}}} + \sqrt {b \tan \left (d x + c\right ) + a} b\right ) - 105 \, b^{3} d \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \log \left (d^{3} \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \sqrt {-\frac {b^{2}}{d^{4}}} + \sqrt {b \tan \left (d x + c\right ) + a} b\right ) + 105 \, b^{3} d \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \log \left (-d^{3} \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \sqrt {-\frac {b^{2}}{d^{4}}} + \sqrt {b \tan \left (d x + c\right ) + a} b\right ) - 4 \, {\left (15 \, b^{3} \tan \left (d x + c\right )^{3} + 3 \, a b^{2} \tan \left (d x + c\right )^{2} + 8 \, a^{3} - 35 \, a b^{2} - {\left (4 \, a^{2} b + 35 \, b^{3}\right )} \tan \left (d x + c\right )\right )} \sqrt {b \tan \left (d x + c\right ) + a}}{210 \, b^{3} d} \]

[In]

integrate((a+b*tan(d*x+c))^(1/2)*tan(d*x+c)^4,x, algorithm="fricas")

[Out]

-1/210*(105*b^3*d*sqrt(-(d^2*sqrt(-b^2/d^4) + a)/d^2)*log(d^3*sqrt(-(d^2*sqrt(-b^2/d^4) + a)/d^2)*sqrt(-b^2/d^
4) + sqrt(b*tan(d*x + c) + a)*b) - 105*b^3*d*sqrt(-(d^2*sqrt(-b^2/d^4) + a)/d^2)*log(-d^3*sqrt(-(d^2*sqrt(-b^2
/d^4) + a)/d^2)*sqrt(-b^2/d^4) + sqrt(b*tan(d*x + c) + a)*b) - 105*b^3*d*sqrt((d^2*sqrt(-b^2/d^4) - a)/d^2)*lo
g(d^3*sqrt((d^2*sqrt(-b^2/d^4) - a)/d^2)*sqrt(-b^2/d^4) + sqrt(b*tan(d*x + c) + a)*b) + 105*b^3*d*sqrt((d^2*sq
rt(-b^2/d^4) - a)/d^2)*log(-d^3*sqrt((d^2*sqrt(-b^2/d^4) - a)/d^2)*sqrt(-b^2/d^4) + sqrt(b*tan(d*x + c) + a)*b
) - 4*(15*b^3*tan(d*x + c)^3 + 3*a*b^2*tan(d*x + c)^2 + 8*a^3 - 35*a*b^2 - (4*a^2*b + 35*b^3)*tan(d*x + c))*sq
rt(b*tan(d*x + c) + a))/(b^3*d)

Sympy [F]

\[ \int \tan ^4(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\int \sqrt {a + b \tan {\left (c + d x \right )}} \tan ^{4}{\left (c + d x \right )}\, dx \]

[In]

integrate((a+b*tan(d*x+c))**(1/2)*tan(d*x+c)**4,x)

[Out]

Integral(sqrt(a + b*tan(c + d*x))*tan(c + d*x)**4, x)

Maxima [F]

\[ \int \tan ^4(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\int { \sqrt {b \tan \left (d x + c\right ) + a} \tan \left (d x + c\right )^{4} \,d x } \]

[In]

integrate((a+b*tan(d*x+c))^(1/2)*tan(d*x+c)^4,x, algorithm="maxima")

[Out]

integrate(sqrt(b*tan(d*x + c) + a)*tan(d*x + c)^4, x)

Giac [F(-1)]

Timed out. \[ \int \tan ^4(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\text {Timed out} \]

[In]

integrate((a+b*tan(d*x+c))^(1/2)*tan(d*x+c)^4,x, algorithm="giac")

[Out]

Timed out

Mupad [B] (verification not implemented)

Time = 21.52 (sec) , antiderivative size = 371, normalized size of antiderivative = 0.81 \[ \int \tan ^4(c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,\left (2\,a\,\left (\frac {4\,a^2}{b^3\,d}-\frac {2\,\left (a^2+b^2\right )}{b^3\,d}\right )-\frac {8\,a^3}{b^3\,d}+\frac {4\,a\,\left (a^2+b^2\right )}{b^3\,d}\right )+\left (\frac {4\,a^2}{3\,b^3\,d}-\frac {2\,\left (a^2+b^2\right )}{3\,b^3\,d}\right )\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{3/2}+\frac {2\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{7/2}}{7\,b^3\,d}-\frac {4\,a\,{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^{5/2}}{5\,b^3\,d}+\mathrm {atan}\left (\frac {d^3\,\left (\frac {16\,\left (b^4-a^2\,b^2\right )\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{d^2}+\frac {16\,a\,b^2\,\left (a-b\,1{}\mathrm {i}\right )\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{d^2}\right )\,\sqrt {-\frac {a-b\,1{}\mathrm {i}}{4\,d^2}}\,1{}\mathrm {i}}{8\,\left (a^2\,b^3+b^5\right )}\right )\,\sqrt {-\frac {a-b\,1{}\mathrm {i}}{4\,d^2}}\,2{}\mathrm {i}+\mathrm {atan}\left (\frac {d^3\,\left (\frac {16\,\left (b^4-a^2\,b^2\right )\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{d^2}+\frac {16\,a\,b^2\,\left (a+b\,1{}\mathrm {i}\right )\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{d^2}\right )\,\sqrt {-\frac {a+b\,1{}\mathrm {i}}{4\,d^2}}\,1{}\mathrm {i}}{8\,\left (a^2\,b^3+b^5\right )}\right )\,\sqrt {-\frac {a+b\,1{}\mathrm {i}}{4\,d^2}}\,2{}\mathrm {i} \]

[In]

int(tan(c + d*x)^4*(a + b*tan(c + d*x))^(1/2),x)

[Out]

atan((d^3*((16*(b^4 - a^2*b^2)*(a + b*tan(c + d*x))^(1/2))/d^2 + (16*a*b^2*(a - b*1i)*(a + b*tan(c + d*x))^(1/
2))/d^2)*(-(a - b*1i)/(4*d^2))^(1/2)*1i)/(8*(b^5 + a^2*b^3)))*(-(a - b*1i)/(4*d^2))^(1/2)*2i + atan((d^3*((16*
(b^4 - a^2*b^2)*(a + b*tan(c + d*x))^(1/2))/d^2 + (16*a*b^2*(a + b*1i)*(a + b*tan(c + d*x))^(1/2))/d^2)*(-(a +
 b*1i)/(4*d^2))^(1/2)*1i)/(8*(b^5 + a^2*b^3)))*(-(a + b*1i)/(4*d^2))^(1/2)*2i + (a + b*tan(c + d*x))^(1/2)*(2*
a*((4*a^2)/(b^3*d) - (2*(a^2 + b^2))/(b^3*d)) - (8*a^3)/(b^3*d) + (4*a*(a^2 + b^2))/(b^3*d)) + ((4*a^2)/(3*b^3
*d) - (2*(a^2 + b^2))/(3*b^3*d))*(a + b*tan(c + d*x))^(3/2) + (2*(a + b*tan(c + d*x))^(7/2))/(7*b^3*d) - (4*a*
(a + b*tan(c + d*x))^(5/2))/(5*b^3*d)